home *** CD-ROM | disk | FTP | other *** search
-
-
-
- Fxattr(2) Oct. 1, 1991 Fxattr(2)
-
-
- N✓NA✓AM✓ME✓E
- Fxattr - get extended attributes for a file
-
- S✓SY✓YN✓NO✓OP✓PS✓SI✓IS✓S
- #include <filesys.h>
-
- LONG Fxattr( WORD flag, char *name, XATTR *xattr );
-
- D✓DE✓ES✓SC✓CR✓RI✓IP✓PT✓TI✓IO✓ON✓N
- _✓F_✓x_✓a_✓t_✓t_✓r gets file attributes for the file named _✓n_✓a_✓m_✓e and
- stores them in the structure pointed to by _✓x_✓a_✓t_✓t_✓r. This
- structure is defined in the file filesys.h, and contains
- the following fields of interest:
-
- unsigned short mode
- This field gives the file type and access permis-
- sions; (mode & S_IFMT) gives the file type (one of
- S_IFCHR, S_IFDIR, S_IFREG, S_IFIFO, S_IMEM, or
- S_IFLNK); (mode & ~S_IFMT) gives the file access
- mode according to the POSIX standard. See filesys.h
- for the definitions and meanings of the constants.
-
- long index
- An index for the file. Together with the "dev"
- field, this is intended to give a unique way of
- identifying the file. Note, however, that not all
- file systems are able to support this meaning, so
- it is best not to use this field unless absolutely
- necessary.
-
- unsigned short dev
- The device number for the file. This may be a BIOS
- device number as passed to the _✓R_✓w_✓a_✓b_✓s function, or
- it may be a device number concocted by the file
- system to represent a remote device.
-
- unsigned short nlink
- Number of hard links to the file. Normally this
- field will be 1.
-
- unsigned short uid
- The user id of the owner of the file.
-
- unsigned short gid
- The group id of the owner of the file.
-
- long size
- The length of the file, in bytes.
-
- long blksize
- The size of blocks on this file system.
-
- long nblocks
- The number of physical blocks occupied by the file
-
-
-
- Version 0.9 MiNT Programmer's Manual 1
-
-
-
-
-
- Fxattr(2) Oct. 1, 1991 Fxattr(2)
-
-
- on the disk; this count includes any blocks that
- have been reserved for the file but do not yet have
- data in them, and any blocks that the file system
- uses internally to keep track of file data (e.g.
- Unix indirect blocks).
-
- short mtime
- The time of the last modification to the file, in
- standard GEMDOS format.
-
- short mdate
- The date of the last modification, in standard GEM-
- DOS format.
-
- short atime, adate
- The time and date of the last access to the file,
- in GEMDOS format. Filesystems that do not keep
- this time will return the values given in "mtime"
- and "mdate" for these fields as well.
-
- short ctime, cdate
- The time and date of the file's creation, in GEMDOS
- format. Filesystems that do not keep this time
- will return the values given in "mtime" and "mdate"
- for these fields as well.
-
- short attr
- The standard TOS attributes for the file, as
- returned by _✓F_✓a_✓t_✓t_✓r_✓i_✓b and/or _✓F_✓s_✓f_✓i_✓r_✓s_✓t.
-
- The _✓f_✓l_✓a_✓g parameter controls whether or not symbolic links
- should be followed. If it is 0, then symbolic links are
- followed (like the Unix _✓s_✓t_✓a_✓t function). If _✓f_✓l_✓a_✓g is 1, then
- links are not followed and the information returned is for
- the symbolic link itself (if the named file is a symbolic
- link); this behavior is like that of the Unix _✓l_✓s_✓t_✓a_✓t system
- call.
-
- R✓RE✓ET✓TU✓UR✓RN✓NS✓S
- 0 on success
-
- EFILNF if the file is not found
-
- EPTHNF if the path to the file is not found.
-
- S✓SE✓EE✓E A✓AL✓LS✓SO✓O
- _✓F_✓a_✓t_✓t_✓r_✓i_✓b(2), _✓F_✓s_✓n_✓e_✓x_✓t(2)
-
-
-
-
-
-
-
-
-
-
- Version 0.9 MiNT Programmer's Manual 2
-
-
-